import { Module } from '@nestjs/common';
import { EnvModule } from './middleware/env/env.module';
import { TypeormModule } from './middleware/typeorm/typeorm.module';
import { RedisModule } from './middleware/redis/redis.module';
import { UserModule } from './views/user/user.module';
import { InformModule } from './views/inform/inform.module';
import { CommonModule } from './views/common/common.module';
import { JwtsModule } from './middleware/jwt/jwt.module';
import { APP_GUARD } from '@nestjs/core';
import { AuthGuard } from './middleware/auth/auth.guard';
import { MinioModule } from './middleware/minio/minio.module';
import { EmailModule } from './middleware/email/email.module';
import { SvgModule } from './middleware/svg/svg.module';
import { WinstonsModule } from './middleware/winston/winston.module';

@Module({
  imports: [
    EnvModule,
    TypeormModule,
    RedisModule,
    MinioModule,
    EmailModule,
    SvgModule,
    WinstonsModule,
    JwtsModule,
    CommonModule,
    UserModule,
    InformModule,
  ],
  controllers: [],
  providers: [
    {
      provide: APP_GUARD,
      useClass: AuthGuard,
    },
  ],
})
export class AppModule {}
